Minimal DFAs for Testing Divisibility
نویسنده
چکیده
The following exercise is typical in introductory texts on deterministic finite automata (DFAs): “produce an automaton that recognizes the set of binary strings that, when interpreted as binary numbers, are divisible by k.” For example, exercise 1.30 in [2] asks the student to prove that the language {x |x is a binary number that is a multiple of k} is regular for each k ≥ 1; explicitly presenting an automaton is the easiest solution. The traditional (and correct) answer constructs a k-state automaton that keeps track not only of divisibility by k, but also the current residue modulo k. For example, if the input read was 1101, the machine would remember “13 mod k”. The transitions between states are simple: if the automaton’s current state is “r mod k”, and the input symbol read is “0”, it moves to state (2r) mod k; if the input symbol read is “1”, it moves to state (2r + 1) mod k. (This example also generalizes to bases other than binary. Furthermore, even if the input string is encoded in base b, the canonical DFA will still have k states. It will, however, contain b transitions from each state.) The traditional answer, unfortunately, in general fails to produce a minimal DFA. This paper addresses the considerably more difficult question of “how many states does a minimal DFA that recognizes the set of base-b numbers divisible by k have?” We denote this number by fb(k) and derive a closed-form expression; in the proof, we also describe the states of the minimal DFA in more detail. The function fb(k) may be computed by algorithmic means. The author used two implementations of the Hopcroft minimization algorithm: an original Perl program and the highly-optimized AT&T FSM Package. According to experts in the field, no prior work addresses the general case of this problem except through such computational alleys.
منابع مشابه
Some finite groups with divisibility graph containing no triangles
Let $G$ be a finite group. The graph $D(G)$ is a divisibility graph of $G$. Its vertex set is the non-central conjugacy class sizes of $G$ and there is an edge between vertices $a$ and $b$ if and only if $a|b$ or $b|a$. In this paper, we investigate the structure of the divisibility graph $D(G)$ for a non-solvable group with $sigma^{ast}(G)=2$, a finite simple group $G$ that satisfies the one-p...
متن کاملMinimal and Hyper-Minimal Biautomata
We compare deterministic finite automata (DFAs) and biautomata under the following two aspects: structural similarities between minimal and hyper-minimal automata, and computational complexity of the minimization and hyper-minimization problem. Concerning classical minimality, the known results such as isomorphism between minimal DFAs, and NL-completeness of the DFA minimization problem carry o...
متن کاملThe DFAs of Finitely Different Languages
Two languages are finitely different if their symmetric difference is finite. We consider the DFAs of finitely different regular languages and find major structural similarities. We proceed to consider the smallest DFAs that recognize a language finitely different from some given DFA. Such f-minimal DFAs are not unique, and this non-uniqueness is characterized. Finally, we offer a solution to t...
متن کاملConstruction of minimal DFAs from biological motifs
Deterministic finite automata (DFAs) are constructed for various purposes in computational biology. Little attention, however, has been given to the efficient construction of minimal DFAs. In this article, we define simple nondeterministic finite automata (NFAs) and prove that the standard subset construction transforms NFAs of this type into minimal DFAs. Furthermore, we show how simple NFAs c...
متن کاملComputing Minimal Separating DFAs and Regular Invariants Using SAT and SMT Solvers
We develop a generic technique to compute minimal separating DFAs (deterministic finite automata) and regular invariants. Our technique works by expressing the desired properties of a solution in terms of logical formulae and using SAT or SMT solvers to find solutions. We apply our technique to three concrete problems: computing minimal separating DFAs (e.g., used in compositional verification)...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- J. Comput. Syst. Sci.
دوره 69 شماره
صفحات -
تاریخ انتشار 2004